
function Ball(radius, color){
	if (radius === undefined) {
		radius = 40;
	}
	if (color === undefined) {
		color = "#00ff00"
	}
	this.x = 0;
	this.y = 0;
	this.vx = 0;
	this.vy = 0;
	this.radius = radius;
	this.rotation = 0;
	this.mass = 1;
	this.scaleX = 1;
	this.scaleY = 1;
	this.color = color;
	this.lineWidth = 1;
}

Ball.prototype.draw = function(ctx){
	ctx.save();
	ctx.translate(this.x, this.y);
	ctx.rotate = this.rotation;
	ctx.scale(this.scaleX, this.scaleY)
	ctx.scale(this.scaleX, this.scaleY);
	ctx.fillStyle = "#ff0000";
	ctx.beginPath();
	ctx.arc(0, 0, this.radius, 0, Math.PI*2, false);
	ctx.closePath();
	ctx.fill();
	ctx.restore();
}


Ball.prototype.getBounds = function(){
    return {
        x: this.x - this.radius,
        y: this.y - this.radius,
        width: this.radius*2,
        height: this.radius*2
    };
}